package com.example.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.Dao.RecruitmentInfoMapper;
import com.example.demo.Dao.UserInfoMapper;
import com.example.demo.enity.RecruitmentInfo;
import com.example.demo.enity.RoleInfo;

/**
 * 1.管理员操作服务层
 * @author limeng
 *
 */
@Service
public class AdminService {

	@Autowired
	UserInfoMapper userInfoMapper;
	@Autowired
	RecruitmentInfoMapper recruitmentInfoMapper;
	/**
	 * 管理员查找违规用户
	 * @return
	 */
	public List<RoleInfo> selectAllIlleageUser(){
		return userInfoMapper.selectAllIlleageUser(null);
	}
	/**
	 * 管理员根据用户id封号
	 */
	public int bannedUser(Integer uid) {
		return userInfoMapper.bannedUser(uid);
	}
	/**
	 * 管理员查找所有违规招聘信息
	 * @return
	 */
	public List<RecruitmentInfo> selectAllIlleageRecuitment(){
		return recruitmentInfoMapper.selectAllIlleageRecuitment(null);
	}
	/**
	 * 管理员根据招聘id删除招聘
	 */
	public int deleteByPrimaryKey(Integer zpid) {
		return recruitmentInfoMapper.deleteByPrimaryKey(zpid);
	}
}
